namespace Cos.Core.NHibernate.Mapping
{
    using FluentNHibernate.Mapping;
    
    public class PartMap : ClassMap<PartDataModel>
    {
        public PartMap()
        {
            this.Table("Part");
            this.LazyLoad();
            this.Id(x => x.Id).Column("PartID");

            this.Map(x => x.PartName).Not.Nullable();
            this.Map(x => x.PartOrder).Not.Nullable();
            this.Map(x => x.IsMultiCulture).Not.Nullable().Column("IsMulticulture");
            this.Map(x => x.IsRequired).Not.Nullable();
            this.Map(x => x.MinValue);
            this.Map(x => x.MaxValue);
            this.Map(x => x.MinLength);
            this.Map(x => x.MaxLength);
            this.Map(x => x.CustomValidator);
            this.Map(x => x.ThumbnailWidth);
            this.Map(x => x.ThumbnailHeight);
            this.Map(x => x.PresentationWidth);
            this.Map(x => x.PresentationHeight);
            this.Map(x => x.TemplateId).Column("TemplateID");
            this.Map(x => x.DataTypeId).Column("DatatypeID");
        }
    }
}